package com.sunlands.zlcx.usercenter.repository;

import com.sunlands.zlcx.usercenter.domain.log.UserActiveLogDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author anjl
 * @date 1:30 PM 2019/4/15
 * description: 存储用户活跃日志
 */
@Repository
public interface UserActiveLogRepository extends JpaRepository<UserActiveLogDO, Long>,JpaSpecificationExecutor<UserActiveLogDO> {

    Boolean existsByUserIdAndDate(Long userId, String date);

    List<UserActiveLogDO> findByCreateTimeBetween(Date start, Date end);
}

